import {
	ElNotification,
	ElMessageBox
} from "element-plus";
import nprogress from 'nprogress'

export function toast(message, type = "success", dangerouslyUseHTMLString = true) {
	ElNotification({
		message,
		type,
		dangerouslyUseHTMLString
	})
}

export function showModal(content = "提示内容", type = "warning", title = "") {
	return ElMessageBox.confirm(
		content,
		title, {
			confirmButtonText: '确认',
			cancelButtonText: '取消',
			type,
		}
	)
}

export function showFullLoading(){
	nprogress.start()
}

export function hideFullLoading(){
	nprogress.done()
}

//弹出输入框
export function showPrompt(tip,value = ""){
	return  ElMessageBox.prompt(tip, '', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
	inputValue:value
  })
}